package sky.springboot.springbootjpa.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.data.domain.AuditorAware;

import java.util.Optional;

/**
 * 该类用于生成jpa自动注入用户ID的注解的值得注入
 */

@Configuration
public class IDCreateBean implements AuditorAware<String> {

    @Override
    public Optional<String> getCurrentAuditor() {
        return Optional.of( "abcerw");
    }
}
